package com.sz.service;

import lombok.RequiredArgsConstructor;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Service;

@Service
@RequiredArgsConstructor
public class RabbitmqSender {
    private final RabbitTemplate rabbitTemplate;
    private final Queue queue01;

    public void sendMsg(String msg){
        rabbitTemplate.convertAndSend(queue01.getName(),msg);
    }
}
